﻿<UserControl 
    x:Class="Caliburn.Micro.BikeWizard.Views.BikeExtrasView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:Caliburn.Micro.BikeWizard.Controls;assembly=Caliburn.Micro.BikeWizard.Controls"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid HorizontalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <controls:GroupBox
                Grid.Row="0"
                FontWeight="Bold"
                Header="Parts group"
                Margin="2"
                HorizontalAlignment="Stretch">
            <ItemsControl x:Name="AvailablePartsGroups" FontWeight="Normal">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <RadioButton
                            Content="{Binding Path=DisplayName}"
                            IsChecked="{Binding Path=IsSelected, Mode=TwoWay}"
                            GroupName="PartsGroup"
                            Margin="2,3.5"
                            />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </controls:GroupBox>

        <controls:GroupBox
                Grid.Row="1"
                FontWeight="Bold"
                Header="Extras (min. 2)"
                Margin="2"
                HorizontalAlignment="Stretch">
            <ItemsControl x:Name="AvailableExtras" FontWeight="Normal">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <CheckBox
                            Content="{Binding Path=DisplayName}"
                            IsChecked="{Binding Path=IsSelected, Mode=TwoWay}"
                            Margin="2,3.5"
                            />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </controls:GroupBox>
    </Grid>
</UserControl>
